![]() | http://www.wavecom.com/forum Release version: 3.04 |
This sample depends on the following libraries :
This Download sample ADL Library allows applications to download or upload applications and data buffers via V24 or GSM Data flow, using the 1K XMODEM protocol, or to/from a FTP server.
The library has to be subscribed, with an event callback, before starting any download or upload process. In order to set up a download or upload session, the application must follow the steps bellow :
All constants and APIs are defined by the download.h header file, which must be included by any application to allows it to use the Download Library.
The library will need the global variable bellow on link operation, to define the trace level on which will be displayed the download traces :
The download APIs are defined bellow :
dwl_Subscribe| Parameter | Description |
| dwlCallback | event callback to be called at the end of the process (see bellow). |
| UseIPLibrary | set to TRUE to start the IP library set to FALSE to use GSM Data download feature |
| Parameter | Description |
| Event | process result (DWL_OK or DWL_ERROR) |
| Length | on DWL_OK : number of downloaded/uploaded bytes on DWL_ERROR : error code |
| Flow | used flow for the process |
| Type | process type (ram or application) |
| Mode | process mode (DWL_MODE_DOWNLOAD or DWL_MODE_UPLOAD) |
| Time | on DWL_OK : down/upload time duration, in seconds on DWL_ERROR : error type |
| Parameter | Description |
| DwlType | Download type. It is a logical or between following values : Download destination : DWL_TYPE_RAM -> copy downloaded data in the provided pData buffer. DWL_TYPE_APPLI -> copy downloaded data in an A&D cell (ID provided in pData parameter). Authentification mode : DWL_AUTH_TYPE_NORMAL -> the download session start immediatly. DWL_AUTH_TYPE_PASSWORD -> the remote part is prompted for a password. Install mode (only used with DWL_TYPE_APPLI mode) : DWL_APPLI_KEEP_MEM -> the application is downloaded and not installed. DWL_APPLI_INSTALL -> the application is installed at the end of the download process. Protocol : DWL_PROTOCOL_XMODEM -> use the 1K XModem protocol on provided FlowID. DWL_PROTOCOL_FTP -> use the FTP protocol, with IPConnect library APIs (FlowID argument is not used). |
| Length | buffer length in DWL_TYPE_RAM mode |
| pData | RAM buffer in DWL_TYPE_RAM mode A&D cell ID in DWL_TYPE_APPLI mode |
| FlowID | ADL flow ID to use for the download process |
| FileName | with FTP protocol, file name on the server |
| FilePath | with FTP protocol, file path on the server |
| Parameter | Description |
| DwlType | Upload type. It is a logical or between following values : Upload source : DWL_TYPE_RAM -> upload data from the provided pData buffer. DWL_TYPE_APPLI -> upload data from an A&D cell (ID provided in pData parameter). Authentification mode : DWL_AUTH_TYPE_NORMAL -> the upload session start immediatly. DWL_AUTH_TYPE_PASSWORD -> the remote part is prompted for a password. Protocol : DWL_PROTOCOL_XMODEM -> use the 1K XModem protocol on provided FlowID. DWL_PROTOCOL_FTP -> use the FTP protocol, with IPConnect library APIs (FlowID argument is not used). |
| Length | buffer length in DWL_TYPE_RAM mode |
| pData | RAM buffer in DWL_TYPE_RAM mode A&D cell ID in DWL_TYPE_APPLI mode |
| FlowID | ADL flow ID to use for the download process |
| FileName | with FTP protocol, file name on the server |
| FilePath | with FTP protocol, file path on the server |
| Parameter | Description |
| CellID | Cell ID to check. |
| Parameter | Description |
| OldPassword | Current password (default value is "startdota") |
| NewPassword | New password to be set (will be stored in non-volatile memory) |
Updated : Thu Apr 27 14:12:36 CEST 2006